<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Nabu-asr: layer.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Nabu-asr
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_5a19dd24bd3679bb79d0ed8fbf6eb6c5.html">nabu</a></li><li class="navelem"><a class="el" href="dir_58864515de009ec37b00c7c6d6449040.html">neuralnetworks</a></li><li class="navelem"><a class="el" href="dir_cbbf0d63f81975b97cb7de71ded32bc5.html">components</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">layer.py File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Neural network layers.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a84b6b1a36ee6ee5cb770012e5aa8e1e2"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="layer_8py.html#a84b6b1a36ee6ee5cb770012e5aa8e1e2">nabu.neuralnetworks.components.layer.blstm</a> (inputs, sequence_length, num_units, layer_norm=False, scope=None)</td></tr>
<tr class="memdesc:a84b6b1a36ee6ee5cb770012e5aa8e1e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">a BLSTM layer  <a href="layer_8py.html#a84b6b1a36ee6ee5cb770012e5aa8e1e2">More...</a><br /></td></tr>
<tr class="separator:a84b6b1a36ee6ee5cb770012e5aa8e1e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5617673c223366a9f9e9cdc94b3a896"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="layer_8py.html#ab5617673c223366a9f9e9cdc94b3a896">nabu.neuralnetworks.components.layer.pblstm</a> (inputs, sequence_length, num_units, num_steps=2, layer_norm=False, scope=None)</td></tr>
<tr class="memdesc:ab5617673c223366a9f9e9cdc94b3a896"><td class="mdescLeft">&#160;</td><td class="mdescRight">a Pyramidal BLSTM layer  <a href="layer_8py.html#ab5617673c223366a9f9e9cdc94b3a896">More...</a><br /></td></tr>
<tr class="separator:ab5617673c223366a9f9e9cdc94b3a896"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf97800237b2e5284e7ccf54c1111c2e"><td class="memItemLeft" align="right" valign="top"><a id="adf97800237b2e5284e7ccf54c1111c2e"></a>
def&#160;</td><td class="memItemRight" valign="bottom"><b>nabu.neuralnetworks.components.layer.projected_subsampling</b> (inputs, input_seq_lengths, num_steps, name=None)</td></tr>
<tr class="separator:adf97800237b2e5284e7ccf54c1111c2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Neural network layers. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="file_a84b6b1a36ee6ee5cb770012e5aa8e1e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a84b6b1a36ee6ee5cb770012e5aa8e1e2">&sect;&nbsp;</a></span>blstm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.components.layer.blstm </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sequence_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>num_units</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>layer_norm</em> = <code>False</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>scope</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>a BLSTM layer </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>the input to the layer as a [batch_size, max_length, dim] tensor </td></tr>
    <tr><td class="paramname">sequence_length</td><td>the length of the input sequences as a [batch_size] tensor </td></tr>
    <tr><td class="paramname">num_units</td><td>The number of units in the one directon </td></tr>
    <tr><td class="paramname">layer_norm</td><td>whether layer normalization should be applied </td></tr>
    <tr><td class="paramname">scope</td><td>The variable scope sets the namespace under which the variables created during this call will be stored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the blstm outputs </dd></dl>

</div>
</div>
<a id="file_ab5617673c223366a9f9e9cdc94b3a896"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_ab5617673c223366a9f9e9cdc94b3a896">&sect;&nbsp;</a></span>pblstm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.components.layer.pblstm </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sequence_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>num_units</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>num_steps</em> = <code>2</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>layer_norm</em> = <code>False</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>scope</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>a Pyramidal BLSTM layer </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>the input to the layer as a [batch_size, max_length, dim] tensor </td></tr>
    <tr><td class="paramname">sequence_length</td><td>the length of the input sequences as a [batch_size] tensor </td></tr>
    <tr><td class="paramname">num_units</td><td>The number of units in the one directon </td></tr>
    <tr><td class="paramname">num_steps</td><td>the number of time steps to concatenate </td></tr>
    <tr><td class="paramname">layer_norm</td><td>whether layer normalization should be applied </td></tr>
    <tr><td class="paramname">scope</td><td>The variable scope sets the namespace under which the variables created during this call will be stored.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>the PBLSTM outputs</li>
<li>the new sequence lengths </li>
</ul>
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>
